function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    for(var e = new Enumerator(ChatWnd.Contacts); !e.atEnd(); e.moveNext()){
        rEmail = (e.item().Email);
    }
    // return Email;
    // ^ use to echo contacts email address
    // return Messenger.MyName;
    // ^ use to echo current users name

    if(Message.substr(0, 2) === "+1") {
        var name = Messenger.MyName;
        var gEmail = Messenger.MyEmail;
        var rMessage = (name + ' has rewarded you with a +1!');

        // Database call
        var url = "http://plusone.samryan.co.uk/test.php";
        var data = ('rEmail= ' + rEmail + '&gEmail=' + gEmail);

        Interop.Call("wininet.dll", "DeleteUrlCacheEntryW", url);
        var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        xmlhttp.open("GET", url, true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttp.setRequestHeader("Content-length", data.length);

        // Declare a ready state change event
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4) {
                if (xmlhttp.status == 200) {
                    // Data from URL was retrieved successfully
                    // Now we can send the response text
                    ChatWnd.SendMessage(xmlhttp.responseText);
                    // Any other code for when the request was succesful
                    // should go here
                } else {
                    // The server returned an HTTP code other than 200
                }
            }
        };
        // After we declared a ready state change event,
        // we can start the request. It won't get started
        // any earlier than this!
        xmlhttp.send(data);
        // The script won't wait for the request to finish.
        // Therefore we'll return an empty string so the
        // declared event can send a message later.
        return "";
    }
}